< previous page page_280 next page >

Page 280
LISTING 10.2. DAOEX2.TXTADDING THE DATA FIELDS TO THE DISPLAY PROPERTIES OF THE CONTROLS.

8694cbadb9b1ef7075903f6f95fc1db2.gif
1: Private Sub DisplayFields()
2: Text1(0).Text = MyDyn(AU_ID)
3: Text1(1).Text = MyDyn(Author)
4: End Sub

Also notice that rather than have unique names for each text box, a control array is used. This allows you to use a loop to quickly modify some of the control's properties, if needed. When you execute the application, you would see only one record's information displayed (see Figure 10.8).
12181-0280a.gif
Figure 10.8.
Display the information for a
single record.
By doing this, you can't move from one record to another in the application. You also should have noticed in the Form_Load event that after the query was created, a MoveFirst method was executed to ensure that the current record pointer points to the first record. Because you're now controlling the access to the data, you must add each navigation button that you want available to users. Generally, you would use the Move methods to provide this functionality. To see how this is done, add four command buttons to the form, as shown in Figure 10.9.
12181-0280b.gif
Figure 10.9.
Adding the manual navigation
buttons to the form.

 
< previous page page_280 next page >

If you like this book, buy it!